package com.briup.es.domain.bean;

import com.briup.es.config.constraints.Add;
import com.briup.es.config.constraints.Update;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.io.Serializable;

/**
 * 收货地址表
 *
 * @TableName es_address
 */
@Data
public class Address implements Serializable {

    /**
     * 收货地址ID
     */
    @Null(message = "添加时id必须不存在", groups = Add.class)
    @NotNull(message = "修改时id必须提供", groups = Update.class)
    private Integer id;
    /**
     * 收件人姓名
     */
    @NotBlank(message = "收货人姓名必须填写")
    private String receiverName;
    /**
     * 省市区地址
     */
    @NotBlank(message = "收货人省市地址必须填写")
    private String urbanAddr;
    /**
     * 详细地址
     */
    @NotBlank(message = "收货人详细地址必须填写")
    private String detailAddr;
    /**
     * 收件人电话
     */
    @NotBlank(message = "收货人联系方式必须填写")
    private String phone;
    /**
     * 下单客户ID
     */
    private Integer userId;
}
